package com.chwn.curiousdiary.ui.search;

import android.view.View;

import com.chwn.curiousdiary.R;
import com.chwn.curiousdiary.ui.BaseShareActivity;
import com.gyf.barlibrary.ImmersionBar;

/**
 * Created by Myshikin on 2017/8/8.
 */

public class SearchActivity extends BaseShareActivity {

    @Override
    protected int getLayoutId() {
        return R.layout.activity_search;
    }

    @Override
    protected View getLocationView() {
        return findViewById(R.id.fl_content);
    }

    @Override
    protected void initView() {
        ImmersionBar.with(this)
                .statusBarView(R.id.top_view)
                .statusBarDarkFont(true, 0.2f)
                .fullScreen(true)
                .addTag("PicAndColor")
                .init();
        SearchFragment searchFragment = new SearchFragment();
        searchFragment.setLoadDataNow(true);
        getSupportFragmentManager()
                .beginTransaction()
                .replace(R.id.fl_content, searchFragment)
                .commit();
    }

    protected boolean isRequredTopBar() {
        return false;
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        ImmersionBar.with(this).destroy();
    }
}
